import request from '@/utils/request';

export function queryUsers(params) {
  return request({
    url: 'users/',
    params,
    // paramsSerializer: function(params) {
    //   return Qs.stringify(params, {arrayFormat: 'brackets'})
    // },
  })
}

export function queryCurrent(params) {
  return request({
    url: 'currentUser/',
    params,
  });
}

export function updateUser(data, query = 4) {
  return request({
    url: `users/${query}/`,
    method: 'put',
    data,
  });
}

export function changePassword(data) {
  return request({
    url: `change_password/`,
    method: 'put',
    data,
  });
}

export function changeMobile(data) {
  return request({
    url: `change_mobile/`,
    method: 'put',
    data,
  });
}
